$('.float-wrap').each(function() {
  new Parallax(this, {
    clipRelativeInput: true
  })
})

$('#J_video_player').attr('height', ($(window).height()  * 1.1 ) + 'px').attr('width', ($(window).width())+ 'px')

var player = videojs('my-player', {
  width: 560
});

$(function(){
	 $(".flexslider").flexslider({
		 slideshowSpeed:4000,//展示时间间隔ms
		 animationSpeed:1000,//滚动时间ms
		 animation:'slide',
		 directionNav:true,
		 touch:true//是否支持触屏滑动

	 });

	 if (window.screen.width<=768) {
     $('#flexslider-video').addClass('flexslider');
     $(".flexslider").flexslider({
  		 slideshowSpeed:4000,//展示时间间隔ms
  		 animationSpeed:1000,//滚动时间ms
  		 animation:'slide',
  		 directionNav:true,
  		 touch:true//是否支持触屏滑动
  	 });
	 }
});
window.sr = ScrollReveal();
sr.reveal('.item', { duration: 4000 }, 80);
$("footer .contact .waysbox").hover(function(){
	var offsetWidth = -$(this).children(".ways").width()/2;
//				console.log(offsetWidth);
	$("footer .waysbox .ways").hide();
	$(this).children(".ways").css("margin-left",offsetWidth);
	$(this).children(".ways").show();
})

$('.open-icon').click(function() {
	$('#vec-nav .container').eq(0).addClass('active')
})

$('.close-icon').click(function() {
	$('#vec-nav .container').eq(0).removeClass('active')
})

$('#vec-nav .meun-item').click(function() {
	$('#vec-nav .container').eq(0).removeClass('active')
})

$('#open-select').click(function() {
	$('#vec-nav .select').addClass('show')
})

$('.mask').click(function() {
	$('#vec-nav .select').removeClass('show')
})
